package com.eol.entity.po.member;

import io.swagger.annotations.ApiModel;

import javax.persistence.Id;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;


/**
 * 用户表
 *
 * @author liulinhui
 * @email 1249055292@qq.com
 * @date 2020-06-01 21:32:01
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel("用户表")
public class ZMember implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @Id
    private String id;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "手机号码")
    private String phone;

    @ApiModelProperty(value = "密码 md5加密")
    private String password;

    @ApiModelProperty(value = "邀请码")
    private String inviteCode;

    @ApiModelProperty(value = "邀请人")
    private String inviteMember;

    @ApiModelProperty(value = "用户积分")
    private Long credit;

    @ApiModelProperty(value = "公众号openid")
    private String openid;

    @ApiModelProperty(value = "用户头像")
    private String avatar;

    @ApiModelProperty(value = "用户邮箱")
    private String email;

    @ApiModelProperty(value = "注册时间")
    private Date createTime;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class RegisterVo {
        @NotNull
        @ApiModelProperty(value = "手机号码")
        private String phone;

        @NotNull
        @ApiModelProperty(value = "手机号码")
        private String password;

        @ApiModelProperty(value = "UUID")
        @NotNull
        private String uuid;

        @ApiModelProperty(value = "code")
        @NotNull
        private String code;

        @ApiModelProperty(value = "inviteMember")
        private String inviteMember;

        @ApiModelProperty(value = "openid")
        private String openid;

        @ApiModelProperty(value = "用户头像")
        private String avatar;

        @ApiModelProperty(value = "用户邮箱")
        private String email;

        @ApiModelProperty(value = "用户名")
        private String userName;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class LoginVo {
        @NotNull
        @ApiModelProperty(value = "手机号码")
        private String phone;

        @ApiModelProperty(value = "密码")
        private String password;

        @ApiModelProperty(value = "UUID")
        private String uuid;

        @ApiModelProperty(value = "code")
        private String code;

        @ApiModelProperty(value = "openid")
        private String openid;

        @ApiModelProperty(value = "用户头像")
        private String avatar;

        @ApiModelProperty(value = "用户名")
        private String userName;
    }

}
